package com.neuedu.shop.service.impl;

import java.util.List;

import com.neuedu.shop.mapper.UserMapper;
import com.neuedu.shop.pojo.User;
import com.neuedu.shop.service.UserService;



/**
 * @author MrDCG
 * @version 创建时间：2019年9月22日 下午3:27:22
 *
 */
public class UserServiceImpl implements UserService {
	public UserMapper mapper;

	public UserServiceImpl() {
	}

	public UserServiceImpl(UserMapper mapper) {
		this.mapper = mapper;
	}

	@Override
	public List<User> findAll() {
		return mapper.findAll();
	}

	@Override
	public void insert(User user) {
		mapper.insert(user);
	}

	@Override
	public User findById(int id) {
		return mapper.findById(id);
	}

	@Override
	public void update(User user) {
		mapper.update(user);
	}

	@Override
	public void delete(int id) {
		mapper.delete(id);
	}
	
	@Override
	public User findByName(String userName) {
		return mapper.findByName(userName);
	}
}
